package com.ian.service.impl;

import com.ian.dao.PerStallMapper;
import com.ian.pojo.PerStall;
import com.ian.service.PerStallService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class PerStallServiceImpl implements PerStallService {
    @Autowired
    PerStallMapper perStallMapper;

    @Transactional
    @Override
    public int insert(PerStall record) {
        return perStallMapper.insert(record);
    }

    @Override
    public List<String> selectPoint() {
        return perStallMapper.selectPoint();
    }

    @Override
    public List<PerStall> findStallsByUid(Integer perUserId) {
        return perStallMapper.findStallsByUid(perUserId);
    }

    @Override
    public int deleteByPrimaryKey(Integer perStallId) {
        return perStallMapper.deleteByPrimaryKey(perStallId);
    }

    @Override
    public PerStall findByLnglat(String perStallLnglat) {
        return perStallMapper.findByLnglat(perStallLnglat);
    }

    @Override
    public PerStall selectByPrimaryKey(Integer perStallId) {
        return perStallMapper.selectByPrimaryKey(perStallId);
    }

    @Transactional
    @Override
    public int updateByPrimaryKey(PerStall record) {
        return perStallMapper.updateByPrimaryKey(record);
    }
}
